﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace DoctorWorld
{
    class Parser
    {
        private String dirFile;

        public Parser(String dirFile)
        {
            this.dirFile = dirFile;
        }

        public List<String> GetFile()
        {
            List<String> listaDeAtributos = new List<String>();
            StreamReader file;
            try
            {
                file = File.OpenText(this.dirFile);
            }
            catch (Exception e)
            {
                throw new FileOpenException();
            }
            
            while(!(file.EndOfStream)) {
                listaDeAtributos.Add(file.ReadLine());
            }

            file.Close();

            return listaDeAtributos;
        }

    }
}
